import java.util.Scanner;

public class C_1108 {
    static int min;
    static int no;
    public static void main(String[] args) {
        min = 100000000;
        no = 100000000;
        Scanner sc = new Scanner(System.in);
        int m = sc.nextInt(), s = sc.nextInt(), t = sc.nextInt();
        dfs(m,0,s,t);
        if (min!=100000000){
            System.out.println("Yes");
            System.out.println(min);
        }
        else {
            System.out.println("No");
            System.out.println(s-no);
        }
    }
    static void dfs(int m,int time,int juli,int t) {
//        System.out.println(time);
        if (juli<=0&&time<t&&time<=min){
            min = time;
            return;
        }
        if (time>=t){
            no = Math.min(no,juli);
            return;
        }
        if (time>=min){
            return;
        }
        if (m>=10){
            dfs(m-10,time+1,juli-60,t);
            return;
        }
        dfs(m+4,time+1,juli,t);
        dfs(m,time+1,juli-17,t);
    }
}
